﻿using Store.Dal;
using Store.Model.Models;
using Store.ViewModel;
using System;
using System.Collections.Generic;
using System.Text;

namespace Store.Bll
{
    public class TypeeBll
    {
        //实例化dal
        private readonly TypeeDAL dal;
        public TypeeBll(TypeeDAL _dal)
        {
            dal = _dal;
        }


        /// <summary>
        /// 查询  显示
        /// </summary>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <param name="total"></param>
        /// <returns></returns>
        public List<TypeeModel> GetTypeeList(int page, int limit, out int total)
        {
            return dal.GetTypeeList(page, limit, out total);
        }


        /// <summary>
        /// 修改分类信息
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        public int UpdTypee(Typee t)
        {
            return dal.UpdTypee(t);
        }


        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="typee"></param>
        /// <returns></returns>
        public int TypeeAdd(Typee typee)
        {
            return dal.TypeeAdd(typee);
        }


        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="sid"></param>
        /// <returns></returns>
        public int TypeeDel(int sid)
        {
            return dal.TypeeDel(sid);
        }
        /// <summary>
        /// 批删
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public int TypeeDelList(string[] ids)
        {
            return dal.TypeeDelList(ids);
        }
    }
}
